<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<base target="_parent"/>
<%@ include file="/page/reslist.jsp" %>
</head>
<body>
	<div class="body-box">
		<div class="rhead">
			<div class="rpos">拥有【${page.result[0].roleName }】角色的用户</div>
			<div class="clear"></div>
		</div>
		<form id="searchForm" method="post" action="${ctx }/acl/v-user-role.action">
			<input type="hidden" name="page.pageNo" id="pageNo" value="1"/>
			<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
			<input type="hidden" name="page.order" id="order" value="${page.order}"/>
			<input type="hidden"  name="filter_EQL_roleId" value="${filter_EQL_roleId}"/>								
			<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" border="0">
				<tr>
					<td width="12%" class="pn-flabel">用户名</td>
					<td colspan="1" width="38%" class="pn-fcontent">
							<input type="text" maxlength="20" name="filter_LIKES_username" value="${filter_LIKES_username}"/>
					</td>
					<td width="12%" class="pn-flabel">姓名</td>
					<td colspan="1" width="38%" class="pn-fcontent">
							<input type="text" maxlength="20" name="filter_LIKES_name" value="${filter_LIKES_name}"/>
					</td>
				</tr>
				<tr>
					<td width="12%" class="pn-flabel">机构代码</td>
					<td colspan="1" width="38%" class="pn-fcontent">
							<input type="text" maxlength="20"  name="filter_LIKES_deptCode" value="${filter_LIKES_deptCode}"/>
					</td>
					<td width="12%" class="pn-flabel">机构名称</td>
					<td colspan="1" width="38%" class="pn-fcontent">
							<input type="text" maxlength="20" name="filter_LIKES_deptName" value="${filter_LIKES_deptName}"/>
					</td>
				</tr>
				<tr>
					<td colspan="4" class="pn-fbutton">
						<input type="submit" value="查询" class="ps-btn" />
					</td>
				</tr>
			</table>
		</form>
		<c:if test="${msg!=null }"><span>${msg }</span></c:if>
		<form id="dataListForm" method="post">
			<input type="hidden"  name="filter_EQL_roleId" value="${param.filter_EQL_roleId}"/>		
			<table class="pn-ltable" width="100%" cellspacing="1" cellpadding="0" border="0">
				<thead class="pn-lthead">
					<tr>
						<th width="20"><input type='checkbox' onclick='Utils.toggleCheckState("ids")'/></th>
						<th>用户名</th>
						<th>姓名</th>
						<th>机构代码</th>
						<th>机构名称</th>	
						<th>角色名称</th>						
						<th>操作选项</th>							
					</tr>
				</thead>				
				<tbody class="pn-ltbody">
				<c:forEach items="${page.result }" var="userRole">
 						<tr align="center">
							<td><input type='checkbox' name='ids' value='${userRole.userId}' ${userRole.userId ne 1?'':'disabled=true' }/></td>
							<td>${userRole.username}</td>
							<td>${userRole.name}</td>
							<td>${userRole.deptCode}</td>
							<td>${userRole.deptName}</td>
							<td>${userRole.roleName}</td>
							<td>
								<c:if test="${userRole.userId ne 1&&sessionScope.hasPermission['Dict:Item:delete'] }">
								   <a href="${ctx }/acl/delete?userId=${userRole.userId}&roleId=${userRole.roleId}" class="pn-opt delete">移除角色</a> 								
								</c:if>														
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<jsp:include page="/page/page.jsp"/>			
			<div class="ps-btn-opt">
				<c:if test="${sessionScope.hasPermission['Dict:Item:delete'] }">
					<input type="button" class="ps-btn" value="批量移除角色"  onclick="Utils.batch('${ctx }/acl/v-user-role!batchDelete.action','移除','条','用户角色');"/> 
				</c:if>					
			</div>
		</form>
	</div>
</body>
</html>